// 导入 ejs 模块
const ejs = require("ejs");
const fs = require("fs");
const path = require("path");

// 读取 html 文件内容
const p = path.resolve(__dirname, "homepage.html");
console.log(p);
const data = fs.readFileSync(p, "utf8");
console.log(data.toString());

let isLogin = false;

// 渲染
const rlt = ejs.render(data.toString(), { isLogin: isLogin });
console.log(rlt);
